package cn.masterj.springcloud.service.fallback;

import com.alibaba.csp.sentinel.slots.block.BlockException;

/**
 * @author masterJ
 * @create 2020-04-18 16:08
 */
public class BlockFallbackFactory {

    public static String blockHandler(Long id,BlockException e){
        System.out.println("-----------------------blockHandler--------" );
        e.printStackTrace();
        return "blockHandler" + e.getMessage();
    }

    public static String fallbackHandler(Long id, Throwable e){
        System.out.println("-----------------------fallbackHandler------" );
        e.printStackTrace();
        return "fallbackHandler" + e.getMessage();
    }


}
